//
//  SelectRepairDetailRegionTableCell.m
//  customer
//
//  Created by Holothurian on 2018/11/4.
//  Copyright © 2018年 yinlong. All rights reserved.
//

#import "SelectRepairDetailRegionTableCell.h"

@implementation SelectRepairDetailRegionTableCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        _nameLabel = [[UILabel alloc]init];
        _nameLabel.font = Font(18);
        _nameLabel.textAlignment = NSTextAlignmentCenter;
        _nameLabel.textColor = [UIColor blackColor];
        _nameLabel.backgroundColor = [UIColor whiteColor];
        _nameLabel.layer.borderWidth = 1;
        _nameLabel.layer.borderColor = [HSPublic colorWithHexString:@"1F89FF"].CGColor;
        _nameLabel.layer.cornerRadius = 10;
        _nameLabel.layer.masksToBounds = YES;
        [self.contentView addSubview:_nameLabel];
        AutoWeakSelf
        [_nameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(weakSelf.contentView).offset(5);
            make.bottom.equalTo(weakSelf.contentView).offset(-5);
            make.left.equalTo(weakSelf.contentView).offset(15);
            make.right.equalTo(weakSelf.contentView).offset(-15);
        }];
    }
    return self;
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end

@implementation SelectedRepairRegionInfoTableCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        AutoWeakSelf
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        UIView *backView = [[UIView alloc]init];
        backView.backgroundColor = [HSPublic colorWithHexString:@"1F89FF"];
        [self.contentView addSubview:backView];
        [backView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(weakSelf.contentView).offset(5);
            make.left.right.equalTo(weakSelf.contentView);
            make.bottom.equalTo(weakSelf.contentView).offset(-5);
        }];
        
        _nameLabel = [[UILabel alloc]init];
        _nameLabel.font = Font(20);
        _nameLabel.textAlignment = NSTextAlignmentLeft;
        _nameLabel.textColor = [UIColor whiteColor];
        _nameLabel.numberOfLines = 0;
        [backView addSubview:_nameLabel];
        [_nameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(backView).offset(5);
            make.bottom.equalTo(backView).offset(-5);
            make.left.equalTo(backView).offset(15);
            make.right.equalTo(backView).offset(-15);
        }];
    }
    return self;
}

@end
